<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<div class="adc">

</div>
<div class="qq">

</div>

<body>


    <script>
        //最快的方法
        var arr = [];
        var qq = document.querySelector('.qq')
        for (var i = 0; i <= 100; i++) {
            arr.push('<a href="#">百度</a>')
        }
        qq.innerHTML = arr.join('')

        // innerHTML创建元素 这种方法创建100个元素最慢
        var iner = document.querySelector('.iner')
        for (var i = 0; i <= 100; i++) {
            iner.innerHTML += '<a href="#">百度</a>'
        }



        // document.querySelector() 创建元素     这种方法创建速度第二
        var create = document.querySelector('.adc')
        //创建100个a
        for (var i = 0; i <= 100; i++) {
            var a = document.createElement('a')
            create.appendChild(a);
        }

    </script>
</body>

</html>